/*
 *
 *      Copyright (c) 2018-2025, scs All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: scs
 *
 */

package com.zyh.scs.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.javers.core.metamodel.annotation.DiffInclude;
import org.javers.core.metamodel.annotation.PropertyName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户充值表
 * </p>
 *
 * @author huwenhao
 * @since 2017-10-29
 */
@Data
@Schema(description = "用户充值表")
@TableName("scsx_recharge")
@Accessors(chain = true)
public class UserRecharge extends Model<UserRecharge> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "recharge_id", type = IdType.AUTO)
    @Schema(description = "主键id")
    private Long rechargeId;


    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    @Schema(description = "用户ID")
    private Long userId;

    @TableField("guid")
    @Schema(description = "guid")
    private String guid;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    @TableField("username")
    private String username;

    /**
     * 工号
     */
    @TableField("user_job_number")
    @Schema(description = "工号")
    private String userJobNumber;

    /**
     * 手机号
     */
    @DiffInclude
    @PropertyName("手机号")
    @Schema(description = "手机号")
    @Length(min = 11, max = 11, message = "手机号必须为11位")
    private String phone;

    /**
     * 用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部
     */
    @Schema(description = "用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部")
    @TableField("user_type")
    private Integer userType;

    /**
     * 充值金额
     */
    @Schema(description = "充值金额")
    @TableField("recharge_number")
    private BigDecimal rechargeNumber;

    /**
     * 充值渠道
     */
    @TableField("recharge_channel")
    @Schema(description = "充值渠道")
    private String rechargeChannel;

    /**
     * 充值类型 1餐补账户、 2福利账户
     */
    @TableField("recharge_type")
    @Schema(description = "充值类型 1餐补账户、 2福利账户")
    private String rechargeType;

    /**
     * 备注
     */
    @TableField("notes")
    @Schema(description = "备注")
    private String notes;

    /**
     * 锁定标记 是否禁用 启用，0未锁定，9已锁定
     */
    @Schema(description = "锁定标记 是否禁用 启用，0未锁定，9已锁定")
    private String lockFlag;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "修改人")
    private String updateBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 0-正常，1-删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;
}
